package com.wechatpay.v3.vo;

import com.google.common.base.Objects;
import com.wechatpay.v3.constants.WechatPayResultCode;

import java.io.Serializable;

/**
 * @author liuyi <liuy@pvc123.com>
 * @since 2021/8/2
 */
public class WechatResult implements Serializable {

    private String code;

    private String message;

    public WechatResult() {
    }

    public WechatResult(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public boolean isSuccess() {
        return Objects.equal(code, WechatPayResultCode.SUCCESS);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
